package cn.sciento.transfer.domain.entity;

import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotBlank;
import cn.sciento.boot.platform.lov.annotation.LovValue;
import cn.sciento.starter.keyencrypt.core.Encrypt;

@ApiModel("数据核对批次明细")
@VersionAudit
@ModifyAudit
@Table(name = "hdtt_data_chk_batch_dtl")
public class DataChkBatchDtl extends AuditDomain {
  private static final String ENCRYPT_KEY = "hdtt_data_chk_batch_dtl";
  
  public static final String FIELD_DATA_CHK_DTL_ID = "dataChkDtlId";
  
  public static final String FIELD_DATA_CHK_LINE_ID = "dataChkLineId";
  
  public static final String FIELD_DATA_CHK_BATCH_ID = "dataChkBatchId";
  
  public static final String FIELD_DATA_ID = "dataId";
  
  public static final String FIELD_SOURCE_LINE = "sourceLine";
  
  public static final String FIELD_TARGET_LINE = "targetLine";
  
  public static final String FIELD_DIFF_TYPE = "diffType";
  
  public static final String FIELD_DIFF_CONTENT = "diffContent";
  
  @Encrypt
  @ApiModelProperty("表ID，主键")
  @Id
  @GeneratedValue
  private Long dataChkDtlId;
  
  @Encrypt
  @ApiModelProperty(value = "批次行ID", required = true)
  @NotNull
  private Long dataChkLineId;
  
  @Encrypt
  @ApiModelProperty(value = "批次ID", required = true)
  @NotNull
  private Long dataChkBatchId;
  
  @ApiModelProperty(value = "数据ID", required = true)
  @NotNull
  private Long dataId;
  
  @ApiModelProperty(value = "来源行JSON数据", required = true)
  @NotBlank
  private String sourceLine;
  
  @ApiModelProperty("目标行JSON数据")
  private String targetLine;
  
  @ApiModelProperty("差异类型，代码HDTT.DATA_DIFF_TYPE")
  @LovValue(lovCode = "HDTT.DATA_DIFF_TYPE", meaningField = "diffTypeMeaning")
  private String diffType;
  
  @ApiModelProperty("差异内容")
  private String diffContent;
  
  @Transient
  private String batchNum;
  
  @Transient
  private String diffTypeMeaning;
  
  public Long getDataChkDtlId() {
    return this.dataChkDtlId;
  }
  
  public void setDataChkDtlId(Long dataChkDtlId) {
    this.dataChkDtlId = dataChkDtlId;
  }
  
  public Long getDataChkLineId() {
    return this.dataChkLineId;
  }
  
  public void setDataChkLineId(Long dataChkLineId) {
    this.dataChkLineId = dataChkLineId;
  }
  
  public Long getDataChkBatchId() {
    return this.dataChkBatchId;
  }
  
  public void setDataChkBatchId(Long dataChkBatchId) {
    this.dataChkBatchId = dataChkBatchId;
  }
  
  public Long getDataId() {
    return this.dataId;
  }
  
  public void setDataId(Long dataId) {
    this.dataId = dataId;
  }
  
  public String getSourceLine() {
    return this.sourceLine;
  }
  
  public void setSourceLine(String sourceLine) {
    this.sourceLine = sourceLine;
  }
  
  public String getTargetLine() {
    return this.targetLine;
  }
  
  public void setTargetLine(String targetLine) {
    this.targetLine = targetLine;
  }
  
  public String getDiffType() {
    return this.diffType;
  }
  
  public void setDiffType(String diffType) {
    this.diffType = diffType;
  }
  
  public String getDiffContent() {
    return this.diffContent;
  }
  
  public void setDiffContent(String diffContent) {
    this.diffContent = diffContent;
  }
  
  public String getBatchNum() {
    return this.batchNum;
  }
  
  public void setBatchNum(String batchNum) {
    this.batchNum = batchNum;
  }
  
  public String getDiffTypeMeaning() {
    return this.diffTypeMeaning;
  }
  
  public void setDiffTypeMeaning(String diffTypeMeaning) {
    this.diffTypeMeaning = diffTypeMeaning;
  }
}
